<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="_fragments :: head"</head>
  <body class="app sidebar-mini">
    <!-- Navbar-->
    <header class="app-header" th:replace="_fragments :: bodyhead"></header>

    <!-- Sidebar menu-->
    <div class="app-sidebar__overlay" data-toggle="sidebar"></div>
    <aside class="app-sidebar" th:replace="_fragments :: aside"></aside>

    <main class="app-content">
      <div class="app-title">
        <div>
          <h1><i class="fa fa-th-list"></i> 个人中心</h1>
        </div>
        <ul class="app-breadcrumb breadcrumb side">
          <li class="breadcrumb-item"><i class="fa fa-home fa-lg"></i></li>
          <li class="breadcrumb-item">个人中心</li>
        </ul>
      </div>

      <div class="row">
        <div class="col-md-12">
          <div class="tile">
            <div class="tile-body">
              <div class="table-responsive">
<!--                搜索框-->
                <ul class="app-nav">
                  <li class="app-search">
                      <form method="post" th:action="@{/searchByUser}">
                          <input class="app-search__input" name="title"  type="search" placeholder="Search">
                          <button class="app-search__button" type="submit"><i class="fa fa-search"></i></button>
                      </form>
                  </li>
                </ul>

                <table class="table table-hover table-bordered" id="sampleTable">
                  <thead>
                    <tr>
                      <th>成果名</th>
                      <th>负责人</th>
                      <th>成果类型</th>
                      <th>研究方向</th>
                      <th>成果发表时间</th>
                      <th>操作</th>
                    </tr>
                  </thead>
                  <tbody>
                  <tr th:each=" ac : ${pageInfo.list}">
                      <td th:text="${ac.title}"></td>
                      <td th:text="${ac.user.userName}"></td>
                      <td th:text="${ac.type}"></td>
                      <td th:text="${ac.direction}"></td>
                      <td th:text="${#dates.format(ac.date,'yyyy-MM-dd')}"></td>
                      <td>
<!--                        <input  name="in1" type="button" value="修改" onclick="inasdaa1(this)">-->
                          <a class="" href="#" th:href="@{/toUpdate/{id}(id=${ac.id})}">修改</a>
                        &nbsp&nbsp&nbsp&nbsp
<!--                        <input  type="button" value="删除" onclick="inAndOut1(this)">-->
                          <a class="" th:href="@{/toDelete/{id}(id=${ac.id})}">删除</a>
                      </td>
                    </tr>
                  </tbody>
                </table>
                <div>
                    <a class="btn btn-primary" style="left: auto" th:href="@{/toPersonalInfo(pagenum=${pageInfo.hasPreviousPage}?${pageInfo.prePage}:1)}">上一页</a>
                    <a class="btn btn-primary"  style="float: right" th:href="@{/toPersonalInfo(pagenum=${pageInfo.hasNextPage}?${pageInfo.nextPage}:${pageInfo.pages})}">下一页</a>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </main>
    <!-- Essential javascripts for application to work-->
    <script src="js/jquery-3.3.1.min.js"></script>
    <script src="js/popper.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/main.js"></script>
    <!-- The javascript plugin to display page loading on top-->
    <script src="js/plugins/pace.min.js"></script>
    <!-- Page specific javascripts-->
    <!-- Data table plugin-->
    <script type="text/javascript" src="js/plugins/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="js/plugins/dataTables.bootstrap.min.js"></script>

  </body>
</html>